<template>
  <el-table :data="dataList" border style="max-width: 1200px;">
    <el-table-column prop="transactionProcessTime" label="事务处理时间" width="120">
      <template v-slot="scope">
        <span>{{ timeFormat(scope.row.transactionProcessTime, 'y2s') }}</span>
      </template>
    </el-table-column>
    <el-table-column prop="account" label="账户" width="100" />
    <el-table-column prop="accountDesc" label="账户描述" width="100" />
    <el-table-column prop="materialCode" label="物料编码" width="100" />
    <el-table-column prop="materialDesc" label="物料描述" />
    <el-table-column prop="unit" label="单位" width="100" />
    <el-table-column prop="amount" label="数量" width="100" />
    <el-table-column prop="unitCost" label="单位成本" width="100" />
    <el-table-column prop="totalPrice" label="事务处理值" width="100" />
    <el-table-column prop="accountingTypeDesc" label="会计类型" width="100" fixed="right" />
  </el-table>
</template>

<script setup lang="ts">
import { JournalEntry } from "@/requests/request";
import { timeFormat } from "@/utils/time"

defineProps({
  dataList: Array<JournalEntry>
});
</script>

<style lang="scss" scoped></style>